﻿using System;
using System.Collections.Generic;
using System.Text;
using NHibernate;
using Rodunu.Movies.Contracts;
using Rodunu.Movies.Data;
using Rodunu.Movies.Interfaces.Activity;

namespace Rodunu.Movies.Logic.Activity
{
    public class SiteUpdatesLogic : Repository<SiteUpdates>, ISiteUpdates
    {
        #region ISiteUpdates Members

        public IList<SiteUpdates> GetRecentSiteUpdates()
        {
            ISession session = DBHelper.GetCurrentSession();
            IQuery query = session.GetNamedQuery("GetSiteUpdates");
            return query.List<SiteUpdates>();
        }

        #endregion
    }
}
